package com.ecloud.gardensterminal.controller;

import com.ecloud.gardensterminal.common.JsonResult;
import com.ecloud.gardensterminal.server.GardensAutoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Squbi
 */
@RestController
public class GardensAutoController {
    @Autowired
    private GardensAutoService autoService;

    @GetMapping("/auto")
    public JsonResult test(Integer deviceId, String field, Double threshold) {
        autoService.checkThreshold(deviceId, field, threshold);
        return JsonResult.success();
    }
}
